﻿using System;
using System.Collections.Generic;
using YJKArchUtils.Utils;

namespace YJKRevitDimensionText.OneKeyPlanDim.Utility
{
	public class CommonLengthLocationComparer : IComparer<CommonLengthLevelDimDataInfo>
	{
		public int Compare(CommonLengthLevelDimDataInfo commonLengthLevel1, CommonLengthLevelDimDataInfo commonLengthLevel2)
		{
			try
			{
				if (Geometry.LessThan(commonLengthLevel1.LadderLineLength, commonLengthLevel2.LadderLineLength))
				{
					return 1;
				}
				if (!Geometry.LessThan(commonLengthLevel1.LadderLineLength, commonLengthLevel2.LadderLineLength))
				{
					return -1;
				}
			}
			catch
			{
			}
			return 0;
		}
	}
}
